home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue60 / Construc / TDM60_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-07-03  |  6.1 KB  |  120 lines

  1. unit TDM60_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                    
  5. // -------                                                                    
  6. // The types declared in this file were generated from data read from a       
  7. // Type Library. If this type library is explicitly or indirectly (via        
  8. // another type library referring to this type library) re-imported, or the   
  9. // 'Refresh' command of the Type Library Editor activated while editing the   
  10. // Type Library, the contents of this file will be regenerated and all        
  11. // manual modifications will be lost.                                         
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.88.1.0.1.0  $
  15. // File generated on 2000/07/03 12:19:05 from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: D:\usr\bob\magazine\DELPHI.MAG\#60\src\TDM60.tlb (1)
  19. // IID\LCID: {F9FCB6C1-50C5-11D4-BFD3-00104BF89DAD}\0
  20. // Helpfile: 
  21. // DepndLst: 
  22. //   (1) v2.0 stdole, (C:\WINNT\System32\STDOLE2.TLB)
  23. //   (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
  24. //   (3) v1.0 Midas, (C:\WINNT\System32\midas.dll)
  25. // ************************************************************************ //
  26. {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
  27. interface
  28.  
  29. uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL, 
  30.   MIDAS;
  31.  
  32. // *********************************************************************//
  33. // GUIDS declared in the TypeLibrary. Following prefixes are used:        
  34. //   Type Libraries     : LIBID_xxxx                                      
  35. //   CoClasses          : CLASS_xxxx                                      
  36. //   DISPInterfaces     : DIID_xxxx                                       
  37. //   Non-DISP interfaces: IID_xxxx                                        
  38. // *********************************************************************//
  39. const
  40.   // TypeLibrary Major and minor versions
  41.   TDM60MajorVersion = 1;
  42.   TDM60MinorVersion = 0;
  43.  
  44.   LIBID_TDM60: TGUID = '{F9FCB6C1-50C5-11D4-BFD3-00104BF89DAD}';
  45.  
  46.   IID_IPoolingMidasServer: TGUID = '{F9FCB6C2-50C5-11D4-BFD3-00104BF89DAD}';
  47.   CLASS_PoolingMidasServer: TGUID = '{F9FCB6C4-50C5-11D4-BFD3-00104BF89DAD}';
  48. type
  49.  
  50. // *********************************************************************//
  51. // Forward declaration of types defined in TypeLibrary                    
  52. // *********************************************************************//
  53.   IPoolingMidasServer = interface;
  54.   IPoolingMidasServerDisp = dispinterface;
  55.  
  56. // *********************************************************************//
  57. // Declaration of CoClasses defined in Type Library                       
  58. // (NOTE: Here we map each CoClass to its Default Interface)              
  59. // *********************************************************************//
  60.   PoolingMidasServer = IPoolingMidasServer;
  61.  
  62.  
  63. // *********************************************************************//
  64. // Interface: IPoolingMidasServer
  65. // Flags:     (4416) Dual OleAutomation Dispatchable
  66. // GUID:      {F9FCB6C2-50C5-11D4-BFD3-00104BF89DAD}
  67. // *********************************************************************//
  68.   IPoolingMidasServer = interface(IAppServer)
  69.     ['{F9FCB6C2-50C5-11D4-BFD3-00104BF89DAD}']
  70.   end;
  71.  
  72. // *********************************************************************//
  73. // DispIntf:  IPoolingMidasServerDisp
  74. // Flags:     (4416) Dual OleAutomation Dispatchable
  75. // GUID:      {F9FCB6C2-50C5-11D4-BFD3-00104BF89DAD}
  76. // *********************************************************************//
  77.   IPoolingMidasServerDisp = dispinterface
  78.     ['{F9FCB6C2-50C5-11D4-BFD3-00104BF89DAD}']
  79.     function  AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; 
  80.                               MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; dispid 20000000;
  81.     function  AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut: Integer; 
  82.                             Options: Integer; const CommandText: WideString; 
  83.                             var Params: OleVariant; var OwnerData: OleVariant): OleVariant; dispid 20000001;
  84.     function  AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant; dispid 20000002;
  85.     function  AS_GetProviderNames: OleVariant; dispid 20000003;
  86.     function  AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant; dispid 20000004;
  87.     function  AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer; 
  88.                             var OwnerData: OleVariant): OleVariant; dispid 20000005;
  89.     procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString; 
  90.                          var Params: OleVariant; var OwnerData: OleVariant); dispid 20000006;
  91.   end;
  92.  
  93. // *********************************************************************//
  94. // The Class CoPoolingMidasServer provides a Create and CreateRemote method to          
  95. // create instances of the default interface IPoolingMidasServer exposed by              
  96. // the CoClass PoolingMidasServer. The functions are intended to be used by             
  97. // clients wishing to automate the CoClass objects exposed by the         
  98. // server of this typelibrary.                                            
  99. // *********************************************************************//
  100.   CoPoolingMidasServer = class
  101.     class function Create: IPoolingMidasServer;
  102.     class function CreateRemote(const MachineName: string): IPoolingMidasServer;
  103.   end;
  104.  
  105. implementation
  106.  
  107. uses ComObj;
  108.  
  109. class function CoPoolingMidasServer.Create: IPoolingMidasServer;
  110. begin
  111.   Result := CreateComObject(CLASS_PoolingMidasServer) as IPoolingMidasServer;
  112. end;
  113.  
  114. class function CoPoolingMidasServer.CreateRemote(const MachineName: string): IPoolingMidasServer;
  115. begin
  116.   Result := CreateRemoteComObject(MachineName, CLASS_PoolingMidasServer) as IPoolingMidasServer;
  117. end;
  118.  
  119. end.
  120.